﻿using CashFlow.Entities;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Should.Fluent;

namespace CashFlow.AzureRepository.Tests
{
	[TestClass]
	public class BillRepositoryTest
	{
		private AzureBillRepository repository;

		[TestInitialize]
		public void InitTest()
		{
			repository = new AzureBillRepository(Tenant.GetDefault().Id);
		}

		[TestMethod]
		public void GetById()
		{
			repository.TenantId = "2";
			var id = "63d72470790a428bafafa3f8ae187348";

			var actual = repository.GetById(id);

			actual.Should().Not.Be.Null();
			actual.Account.Id.Should().Equal("1");
		}

		[TestMethod]
		[Ignore]
		public void Delete()
		{
			repository.TenantId = "2";
			var id = "24ac3cac8cf546bf827f13521df1d928";

			repository.Delete(id);

			Assert.IsTrue(true);
		}

		[TestMethod]
		[Ignore]
		public void UnDelete()
		{
			repository.TenantId = "2";
			var id = "24ac3cac8cf546bf827f13521df1d928";

			repository.UnDelete(id);

			Assert.IsTrue(true);
		}
	}
}
